package com.magic.gre;

import android.content.Context;

import com.magic.gre.helper.Contract;
import com.noname.lib_base_java.global.GlobalApplication;
import com.noname.lib_base_java.net.NetManager;
import com.noname.lib_base_java.util.L;

import cn.jpush.android.api.JPushInterface;

/**
 * Author: Lmoumou
 * Date: 2019-01-07 11:18
 * 文件名: GREApp
 * 描述:
 */
public class GREApp extends GlobalApplication {
    private static GREApp sInstance;

    @Override
    public void onCreate() {
        super.onCreate();
        sInstance = this;

        NetManager.init(Contract.BASE_URL,
                Contract.BASE_RE_URL,
                Contract.AREA_FIEL);

        JPushInterface.setDebugMode(BuildConfig.DEBUG);
        JPushInterface.init(this);            // 初始化 JPush
        String registrationID = JPushInterface.getRegistrationID(this);//在这里获取一次JpushID
        L.e("GREApp","registrationID->"+registrationID);
    }
    public static Context getInstance() {
        return sInstance;
    }
}
